<template>
  <AppVideo :videoList="videoList"></AppVideo>
</template>

<script setup lang="ts">
import AppVideo from '@/components/app-video.vue';
import axios from 'axios'
import { ref, onMounted } from 'vue'

export interface IVideoItem {
  commentCount: string,
  desc: string,
  id: string,
  imgSrc: string,
  link: string,
  playCount: string,
  videoSrc: string,
  author: string
}


const videoList = ref<IVideoItem[]>([])

onMounted(async () => {
  const res = await axios({
    method: 'get',
    url: '/videosList',
  })

  videoList.value = res.data.result
})

</script>
<style scoped lang="scss"></style>